package com.caigou.modules.famous.network.api

import com.caigou.comm.base.bean.HttpResult
import com.caigou.comm.base.bean.PrizeBallBean
import com.caigou.modules.famous.bean.*
import kotlinx.coroutines.flow.Flow
import okhttp3.RequestBody
import retrofit2.http.*

/**
 * @author #Suyghur.
 * Created on 2021/12/09
 */
interface HttpFamousApiService {

    @GET("/api/famous/list")
    fun getFamousList(
        @Query("dareTypeId") dareTypeId: Int,
        @Query("type") type: Int,
        @Query("sort") sort: Int,
        @Query("currentUserId") currentUserId: String
    ): Flow<HttpResult<FamousBean>>


    @GET("/api/famous/person/info")
    fun getContestList(
        @Query("dareTypeId") dareTypeId: Int,
        @Query("type") type: Int,
        @Query("userId") userId: String,
        @Query("currentUserId") currentUserId: String
    ): Flow<HttpResult<PersonalBean>>

    @GET("/api/famous/dare/content/subscribe/list")
    fun getSubscribeRecordList(
        @Query("dareTypeId") dareTypeId: Int,
        @Query("type") type: Int,
        @Query("userId") userId: String
    ): Flow<HttpResult<MutableList<FamousItemBean>>>

    @GET("/api/famous/dare/content/subscribe/user/list")
    fun getSubscribe2otherList(@Query("type") type: Int, @Query("userId") userId: String): Flow<HttpResult<MutableList<SubscribeItemBean>>>

    @GET("/api/famous/dare/content/subscribe/me/list")
    fun getSubscribe2meList(@Query("type") type: Int, @Query("userId") userId: String): Flow<HttpResult<MutableList<SubscribeItemBean>>>

    @GET("/api/famous/my/challenge/record/list")
    fun getMyChallengeList(@Query("dareTypeId") dareTypeId: Int, @Query("type") type: Int, @Query("userId") userId: String): Flow<HttpResult<MyChallengeBean>>

    @GET("/api/famous/challenge/done/record/list")
    fun getRewardRecordList(@Query("type") type: Int): Flow<HttpResult<MutableList<MyChallengeItemBean>>>

    @GET("/api/famous/challenge/param/list")
    fun getChallengeParamsList(@Query("dareTypeId") dareTypeId: Int): Flow<HttpResult<MutableList<ChallengeParamsItemBean>>>

    @GET("/api/famous/my/dare/result/list")
    fun getMyRecordList(@Query("type") type: Int, @Query("userId") userId: String): Flow<HttpResult<MutableList<MyRecordItemBean>>>

    @GET("/api/animal/number/list")
    fun getPublishBallList(): Flow<HttpResult<MutableList<PrizeBallBean>>>

    @POST("/api/famous/join/challenge")
    fun joinChallenge(@Body body: RequestBody, @Header("Content-type") header: String = "application/json;charset=utf-8"): Flow<HttpResult<String>>

    @POST("/api/famous/abandon/challenge")
    fun cancelChallenge(@Body body: RequestBody, @Header("Content-type") header: String = "application/json;charset=utf-8"): Flow<HttpResult<String>>

    @POST("/api/famous/add/dare/content")
    fun publishChallenge(@Body body: RequestBody, @Header("Content-type") header: String = "application/json;charset=utf-8"): Flow<HttpResult<String>>

    @POST("/api/famous/dare/content/like")
    fun setLike(@Body body: RequestBody, @Header("Content-type") header: String = "application/json;charset=utf-8"): Flow<HttpResult<String>>

    @POST("/api/famous/dare/content/subscribe")
    fun setSubscribe(@Body body: RequestBody, @Header("Content-type") header: String = "application/json;charset=utf-8"): Flow<HttpResult<String>>

    @POST("/api/menu/award")
    fun setReward(@Body body: RequestBody, @Header("Content-type") header: String = "application/json;charset=utf-8"): Flow<HttpResult<String>>

    @POST("/api/my/card/bag/flower/buy")
    fun buyFlower(@Body body: RequestBody, @Header("Content-type") header: String = "application/json;charset=utf-8"): Flow<HttpResult<String>>

    @POST("/api/follow/both")
    fun setFollow(@Body body: RequestBody, @Header("Content-type") header: String = "application/json;charset=utf-8"): Flow<HttpResult<String>>

}